//
//  AboutClassCollectionViewCell.m
//  Products_B
//
//  Created by lanou on 16/5/30.
//  Copyright © 2016年 朋学友. All rights reserved.
//

#import "AboutClassCollectionViewCell.h"

@interface AboutClassCollectionViewCell() {
    UIImageView *_dishIamgeView;
}

@end


@implementation AboutClassCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        _dishIamgeView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, kWidth * 3 / 10, kWidth * 3 / 10)];
        [self.contentView addSubview:_dishIamgeView];
        
        // 该button是假的，不予点击
        UIButton *playButton = [UIButton buttonWithType:UIButtonTypeCustom];
        playButton.frame = CGRectMake((_dishIamgeView.frame.size.width - 40) / 2, (_dishIamgeView.frame.size.height - 40) / 2, 40, 40);
        [playButton setImage:[UIImage imageNamed:@"CookClassPlay.png"] forState:UIControlStateNormal];
        [_dishIamgeView addSubview:playButton];
    }
    return self;
}

- (void)setAboutClassModel:(AboutClassModel *)aboutClassModel {
    _aboutClassModel = aboutClassModel;
    [_dishIamgeView sd_setImageWithURL:[NSURL URLWithString:aboutClassModel.dishes_image]];
}

@end




